﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Controls.Primitives;

namespace AppDemo
{
    /// <summary>
    /// Interaction logic for Window4.xaml
    /// </summary>
    public partial class Window4 : Window
    {
        public Window4()
        {
            InitializeComponent();
        }

        private object selectedItem;
        private bool canSelected = true;

        private void aa_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //Console.WriteLine(Mouse.LeftButton.ToString());
            //if (selectedItem == null && canSelected)
            //{
            //    selectedItem = e.AddedItems[0];
            //    canSelected = false;
            //}
            //else
            //{
            //    aa.SelectedItem = selectedItem;
            //}
            //if (Mouse.LeftButton == MouseButtonState.Pressed)
            //{
                
            //}
        }

        private void aa_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            canSelected = true;
            selectedItem = null;
        }
    }


}
